home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Documentation / Tech Notes & Articles / Recipes / Imaging & Layout / Content Update Notification < prev    next >
Encoding:
Text File  |  1995-11-06  |  1.9 KB  |  29 lines  |  [TEXT/ttxt]

  1. OpenDoc™ Recipes
  2.  
  3. Content Update Notification
  4. By The OpenDoc Design Team
  5. November 6, 1995
  6.  
  7.  
  8. © 1993-1995  Apple Computer, Inc. All Rights Reserved.
  9. Apple, the Apple logo, AppleScript, Bento, Macintosh, QuickTime, and OpenDoc are 
  10. registered trademarks of Apple Computer, Inc.
  11. Finder, Mac, and QuickDraw are trademarks of Apple Computer, Inc. 
  12. SOM, SOMObjects, and System Object Model are licensed trademarks of IBM Corporation. 
  13.  
  14.  
  15. Introduction
  16.  
  17. All OpenDoc parts are responsible for notifying their containing part when their content changes.  This notification enables a containing part to update links that include embedded data.  This document summarizes the responsibilities of a part that does not support linking.  Developers of parts supporting linking are referred to the Linking recipes for more information.
  18.  
  19. Calling ODFrame::ContentUpdated
  20.  
  21. Parts call the ContentUpdated method of their display frames to notify their containing parts of changes to their content.  When a change originates in a part, for example, in response to keyboard input,, the part should call the ContentUpdated method of each display frame affected by the change, passing it an update ID for the change.  For changes originating within a part, this ID should be obtained by calling the UniqueUpdateID method of the session object.  For example:
  22.  
  23. displayFrame->ContentUpdated(ev, mySession->UniqueUpdateID(ev));
  24.  
  25. It is not necessary to call ContentUpdated on every individual change, for example, on every keystroke.  A part can “batch” individual changes into one call to ContentUpdated, by waiting for a reasonable pause in changes or until the part loses the selection focus.  Be sure to use call UniqueUpdateID each time ContentUpdated is called, however.
  26.  
  27. Implementing EmbeddedFrameUpdated
  28.  
  29. A part that does not support linking does not need to take any action in its EmbeddedFrameUpdated method.  In particular, it does not need to pass the notification to its containing part.